Processor architectures often separate the actions associated with executing an instruction into a plurality of successive stages. At a given point in time, several different instructions may be at respective different stages of execution. This technique, which is known as pipelining, increases the overall performance of the processor. However, pipelining can result in difficulty for a system developer who is attempting to debug the system, and who in particular is attempting to associate various signals in the pipeline to the instruction which performed them. This is because, at any given point in time, the pipeline includes various different signals which correspond to different instructions.
For example, a first stage of the pipeline may be handling a first instruction which is being decoded, a second stage may be handling a second instruction which is issuing an address for a memory read, a third stage may be handling a third instruction which is receiving data from a memory read, and a fourth stage may be handling a fourth instruction which is issuing an address and data for a memory write. Thus, as to any given instruction, it is not possible with the pipeline alone to observe, at a single point in time, all of the activity associated with execution of that instruction.
A known approach is to provide a flattener circuit, which buffers or delays selected pipeline signals until a later point in time. In particular, different signals from different pipeline stages are delayed by different amounts of time. The flattener simultaneously outputs all of the selected information for a given instruction, even though the information was gathered at different points in time during the execution of the instruction. While conventional flatteners of this type have been adequate for their intended purposes, they have not been satisfactory in all respects.
For example, where the processor and its pipeline are implemented in an integrated circuit, the flattener has been provided externally to the integrated circuit. Consequently, in order to have access to certain control signals of the pipeline, which normally would not be brought off the integrated circuit, a large number of external connection pins of the integrated circuit must be dedicated to pipeline signals, so that the external flattener can have access to the signals.
The number of external connection pins can be reduced slightly by providing off-chip circuitry to generate certain signals that are also generated within the integrated circuit, but such off-chip circuitry effectively duplicates circuitry within the integrated circuit, and thus increases the cost and power consumption of the overall system. A further consideration is that, in such systems, the flattener is remote from the source of pipeline activity, and thus may not be capable of operating at the speed of the processor when the processor is operating at higher frequencies, except through an approach which is sufficiently complex to be effectively cost-prohibitive.